import gtk.gdk

w = gtk.gdk.get_default_root_window()
width = 300
height = 250
start_x = 80
start_y = 75
#print "The size of the window is %d x %d" % sz
pb = gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB,False,8,width,height)

pb = pb.get_from_drawable(w,w.get_colormap(),start_x,start_y,0,0,width,height)
if (pb != None):
    pb.save("screenshot.bmp","bmp")
    print "Screenshot saved to screenshot.png."
else:
    print "Unable to get the screenshot."

#Use the multi-processing libraries
